<?php
namespace App\Api\Jogging\V2;

use PhalApi\Api;
use App\Domain\Jogging\V1\JoggingDomain;

/**
 * 运动V2
 * @author dogstar 20170612
 */

class Jogging extends Api {

    public function getRules() {
        return array(
            'index' => array(
                'id' => array('name' => 'id', 'type' => 'int', 'require' => true, 'default' => 0, 'desc' => ''),
            ),
        );
    }

    /**
     * 运动
     * @desc 运动列表
     * @return int id 新增的ID
     */
    public function index() {
        $rs = array();
        $newData = array('id' => $this->id);
        $domain = new JoggingDomain();
        $id = $domain->index($newData);
        $rs['id'] = 2;
        return $rs;
    }
}
